package cn.taobaoke.restful.domain;

import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

/**
 * @author yangzuo
 * @since 2017-03-123
 */
public interface AgentGroupRelationRepository extends JpaRepository<AgentGroupRelation, Long> {

    List<AgentGroupRelation> findByAgentIdAndDomainId(Long agentId, Long domainId);

    Optional<AgentGroupRelation> findByAgentIdAndGroupIdAndDomainId(Long agentId, Long groupId, Long domainId);
}

